<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="no-cache">
		<meta http-equiv="Expires" content="0">
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="email=no" />
		<meta name="format-detection" content="address=no" />
		<meta name="format-detection" content="date=no" />
		<meta http-equiv="refresh" content="600">
		<title>APP流量果浇水</title>
		<script type="text/javascript">
		!function(N,M){function L(){var a=I.getBoundingClientRect().width;a/F>540&&(a=540*F);var d=a/10;I.style.fontSize=d+"px",D.rem=N.rem=d}var K,J=N.document,I=J.documentElement,H=J.querySelector('meta[name="viewport"]'),G=J.querySelector('meta[name="flexible"]'),F=0,E=0,D=M.flexible||(M.flexible={});if(H){console.warn("将根据已有的meta标签来设置缩放比例");var C=H.getAttribute("content").match(/initial\-scale=([\d\.]+)/);C&&(E=parseFloat(C[1]),F=parseInt(1/E))}else{if(G){var B=G.getAttribute("content");if(B){var A=B.match(/initial\-dpr=([\d\.]+)/),z=B.match(/maximum\-dpr=([\d\.]+)/);A&&(F=parseFloat(A[1]),E=parseFloat((1/F).toFixed(2))),z&&(F=parseFloat(z[1]),E=parseFloat((1/F).toFixed(2)))}}}if(!F&&!E){var y=N.navigator.userAgent,x=(!!y.match(/android/gi),!!y.match(/iphone/gi)),w=x&&!!y.match(/OS 9_3/),v=N.devicePixelRatio;F=x&&!w?v>=3&&(!F||F>=3)?3:v>=2&&(!F||F>=2)?2:1:1,E=1/F}if(I.setAttribute("data-dpr",F),!H){if(H=J.createElement("meta"),H.setAttribute("name","viewport"),H.setAttribute("content","initial-scale="+E+", maximum-scale="+E+", minimum-scale="+E+", user-scalable=no"),I.firstElementChild){I.firstElementChild.appendChild(H)}else{var u=J.createElement("div");u.appendChild(H),J.write(u.innerHTML)}}N.addEventListener("resize",function(){clearTimeout(K),K=setTimeout(L,300)},!1),N.addEventListener("pageshow",function(b){b.persisted&&(clearTimeout(K),K=setTimeout(L,300))},!1),"complete"===J.readyState?J.body.style.fontSize=12*F+"px":J.addEventListener("DOMContentLoaded",function(){J.body.style.fontSize=12*F+"px"},!1),L(),D.dpr=N.dpr=F,D.refreshRem=L,D.rem2px=function(d){var c=parseFloat(d)*this.rem;return"string"==typeof d&&d.match(/rem$/)&&(c+="px"),c},D.px2rem=function(d){var c=parseFloat(d)/this.rem;return"string"==typeof d&&d.match(/px$/)&&(c+="rem"),c}}(window,window.lib||(window.lib={}));
		</script>
		<link rel="stylesheet" type="text/css" href="./index.css"/>
	</head>
	<body>
		<div class="treeMain">
			<div class="huBottom"></div>
			<div class="huTop">
				<div class="water"></div>
			</div>
			<div class="my"></div>
			<!--小提示-->
			<div class="mopup tip">
				<div class="frame5">
					<div class="close tipClose"></div>
					<div class="tipTitle" style="width: 2.253rem;height: 0.667rem;left: 3.12rem;"></div>
					<p class="outSucText"></p>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="./jquery-2.1.1.min.js"></script>
	<script>
		$(function(){
			var playerId=GetQueryString("playerId")
			var code=GetQueryString("code")
			
			var friendPhone
			 $.ajax({
        		url: "http://223.99.25.195:8008/liuliangshu/userInfoCtl/getuserinfoEncrypt",
        		type: "get",
        		data: {
        			"code":code
        		},
        		success: function(data){	
					//alert(JSON.stringify(data.data));				
        			var json=JSON.parse(data.data);
					
					friendPhone=json.re.telNum;
					
						
					
					var provinceCode=json.re.provinceCode
					if(provinceCode!=531){
						window.location.href='http://dx.10086.cn/wxgrzy'
					}
        		},
        		error: function () {
        			console.log("error");
        		}
        	})
			function GetQueryString(name){
	            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	            var r = window.location.search.substr(1).match(reg);
	            if(r!=null)return  unescape(r[2]); return null;
        	}
			
			$('.huBottom').on('click',function(){
				//alert(playerId+"="+friendPhone);
				$(this).hide()
				$('.huTop').show()
				$('.water').css('animation','water 2s linear 1')
				$.get('http://223.99.25.195:8008/liuliangshu/okrCtl/watering?gameId=1&playerId='+playerId+'&friendPhone='+encodeURIComponent(friendPhone) ,function(res){
					//http://112.33.0.110:8008/appflowfruit/
					if(!res.success){
						setTimeout(function(){
							$('.tip .outSucText').text('系统异常!')
							$('.tip').show()
							$('.tip .close').on('click',function(){
								$('.tip').hide()
							})
						},2000)						
					}else{
						setTimeout(function(){
							$('.tip .outSucText').text(res.data)
							$('.tip').show()
							$('.tip .close').on('click',function(){
								$('.tip').hide()
							})
						},2000)	
					}					
				})
			})
			$('.my').on('click',function(){
				window.location.href='./sm.html'
			})
		})
	</script>
</html>
